package com.googlecode.cswish.struts;

import java.util.Collection;
import java.util.Map;

import com.googlecode.cswish.util.InvocationUtil.ServiceInfo;
import com.opensymphony.xwork2.ActionInvocation;

/**
 * Prepare the self-defined parameter after the action is created, invoked by ScopeParametersInterceptor
 * 
 * @author Jerry
 *
 */
public interface DynamicAction extends Action, Map<String, Object> {
	/**
	 * Build the action property
	 * 
	 * @param actionName
	 */
	public void initialize(String actionName, String pathWithSite);
	
	public Class getPropertyType(String name);
	
	public Class getGenericPropertyType(String name);

	public String getActionName();

	public Collection<String> getProperties();
	
	/**
	 * Prepare action parameters
	 * 
	 * @param invocation
	 */
	public void prepareParameter(ActionInvocation invocation);
	
	public ServiceInfo getServiceInfo();
}
